--[[
  邮储银行 - 清算系统 - WEB应用
]]
require("apm_core")
require("ApmJson")
require("extension")
require("ApmHttpUtil")

local G_DEBUG = true

if G_DEBUG == false then
    function logDebug(fmt,...) end
    function logInfo(fmt,...) end
    function logWarn(fmt,...) end
    function logError(fmt,...) end
    function logFatal(fmt,...) end
end

local dict_channel = {}
local dict_transtype = {
    T022757	=  "头寸调拨-功能选择",
    T022758	=  "头寸管理-自动调拨前查询",
    T020188	=  "外系统日中对账自动调整参数查询及维护",
    T023160	=  "与公司业务系统贷记存款单笔处理",
    T020842	=  "大额往帐应急控制授权",
    T022768	=  "头寸调拨录入（SWIFT方式）",
    T022769	=  "头寸调拨复核（SWIFT方式）",
    T020913	=  "大额即时转账处理",
    T022770	=  "头寸调拨付款（SWIFT方式）",
    T022771	=  "头寸调拨远程审批（SWIFT方式）",
    T022752	=  "头寸管理-账户余额查询",
    T022753	=  "头寸管理-划款历史明细查询",
    T022754	=  "账户附加信息查询",
    T021921	=  "境内外汇业务退汇申请",
    T021923	=  "境内外汇业务退汇申请应答",
    T021925	=  "境内外汇自由格式报文",
    T021926	=  "境内外汇查询业务",
    T021927	=  "境内外汇查复业务",
    T021928	=  "境内外汇撤销业务",
    T021932	=  "境内外汇业务来/往账登记簿查询",
    T021933	=  "境内外汇业务查询查复登记簿",
    T021934	=  "境内外汇业务退汇申请/应答登记簿",
    T021935	=  "境内外汇撤销申请登记簿",
    T021936	=  "境内外汇业务自由格式查询",
    T021937	=  "境内外汇行名行号查询",
    T022006	=  "内部户批量委托支付(行内公司)",
    T022018	=  "内部户批量公司扣款",
    T022052	=  "回盘文件解析入库",
    T022602	=  "MT292撤销报文",
    T022603	=  "MT292撤销报文授权",
    T022607	=  "MT299自由格式",
    T022620	=  "外汇业务通知收款MT210",
    T022701	=  "外币上划下拨参数维护-新增(SWIFT)",
    T022702	=  "外币上划下拨参数维护-修改(SWIFT)",
    T022703	=  "外币上划下拨参数维护-删除(SWIFT)",
    T022704	=  "外币上划下拨参数维护-查询(SWIFT)",
    T022705	=  "外币同业调拨参数维护-新增",
    T022706	=  "外币同业调拨参数维护-修改",
    T022707	=  "外币同业调拨参数维护-删除",
    T022708	=  "外币同业调拨参数维护-查询",
    T022709	=  "增加外汇风险准备金/存款准备金录入",
    T022710	=  "增加外汇风险准备金/存款准备金复核",
    T022711	=  "增加外汇风险准备金/存款准备金异地审批",
    T022712	=  "增加外汇风险准备金/存款准备金付款(本地审批）",
    T022713	=  "上划下拨外币账户信息维护(中行网银方式)-查询",
    T022714	=  "上划下拨外币账户信息维护(中行网银方式)",
    T022715	=  "申请下拨资金中行网银机构维护-查询",
    T022716	=  "申请下拨资金中行网银机构维护",
    T022717	=  "外币同业调拨参数维护-授权",
    T022718	=  "上划下拨外币账户信息维护(中行网银方式)-授权",
    T022719	=  "收到下拨资金（SWIFT/中行网银方式）",
    T022720	=  "申请下拨资金录入（SWIFT方式）",
    T022721	=  "申请下拨资金复核（SWIFT方式）",
    T022722	=  "向总行申请下拨资金本地审批（+付款）",
    T022723	=  "向总行申请下拨资金异地审批（+付款）",
    T022724	=  "申请下拨资金中行网银机构维护-授权",
    T022730	=  "总行同业资金调出录入",
    T022731	=  "总行同业资金调出复核",
    T022732	=  "总行同业资金调出本地审批（+付款）",
    T022733	=  "总行同业资金调出异地审批（不付款）",
    T022734	=  "增加外汇风险准备金/存款-功能选择",
    T022740	=  "外汇净额支付结算录入",
    T022741	=  "外汇净额支付结算复核",
    T022742	=  "外汇净额支付结算付款（本地审批）",
    T022743	=  "外汇净额支付结算异地审批",
    T022744	=  "外汇净额支付结算-功能选择",
    T022745	=  "外汇代理清算行支付-功能选择",
    T022746	=  "外汇代理清算行支付录入",
    T022747	=  "外汇代理清算行支付复核",
    T022748	=  "外汇代理清算行支付异地审批",
    T022749	=  "外汇代理清算行支付付款（本地审批）",
    T022750	=  "资金调拨登记簿查询",
    T022751	=  "外币上划下拨参数维护-授权(SWIFT)",
    T022760	=  "央行存款准备金增加",
    T022761	=  "央行存款准备金减少",
    T022762	=  "央行存款准备金增加授权",
    T022763	=  "央行存款准备金减少授权",
    T022781	=  "上划下拨外币账户信息维护新增(银行)",
    T022782	=  "上划下拨外币账户信息维护修改(银行)",
    T022783	=  "上划下拨外币账户信息维护删除(银行)",
    T022784	=  "上划下拨外币账户信息维护查询(银行)",
    T022785	=  "上划下拨外币账户信息维护授权(银行)",
    T022901	=  "委托单位结算参数维护",
    T022902	=  "委托单位备用结算账户维护",
    T022903	=  "子委托单位业务参数维护",
    T022910	=  "委托单位分户关联维护",
    T022911	=  "委托单位分户解关联",
    T022912	=  "TIPS国库清算代理关联维护",
    T022913	=  "TIPS国库清算代理机构维护",
    T020730	=  "接收中平手工结算任务推送",
    T022921	=  "中平手工结算交易复核",
    T022922	=  "中平手工结算交易付款",
    T020731	=  "接收中平批量代收付类交易任务推送",
    T022923	=  "中平批量代收付类复核",
    T022924	=  "中平批量代收付类付款",
    T022961	=  "对账单回执信息录入",
    T022962	=  "对账结果查询",
    T022963	=  "补充对账信息录入",
    T022964	=  "电话对账信息录入",
    T022965	=  "汇划任务及任务状态通知对账",
    T023003	=  "日终任务自动撤销",
    T023107	=  "批量大小额交易对账优化",
    T023108	=  "公司WSC对账不一致自动处理",
    T023109	=  "清算系统与国际支付前置报文状态不一致调整",
    T023124	=  "接收并处理公司业务系统对账文件",
    T027001	=  "人行支付来账通知",
    T027003	=  "人行支付处理结果通知",
    T027004	=  "行内支付处理结果通知",
    T027012	=  "内部账户变动通知",
    T027016	=  "来账通知公司",
    T027017	=  "即时转借贷来账通知资金营运",
    T027018	=  "来账通知其他业务系统",
    T027019	=  "支票入账通知储蓄",
    T027020	=  "来账通知储蓄",
    T027021	=  "定期借记回执",
    T022756	=  "向总行上划资金-功能选择",
    T022764	=  "向总行上划资金录入（SWIFT方式）",
    T022765	=  "向总行上划资金复核（SWIFT方式）",
    T022766	=  "向总行上划资金付款（SWIFT方式）",
    T022767	=  "向总行上划资金远程审批（SWIFT方式）",
    T024401	=  "内部支票购入登记",
    T024402	=  "内部支票购入取消",
    T024403	=  "内部支票使用登记",
    T024404	=  "内部支票使用修改",
    T024405	=  "内部支票丢失",
    T024406	=  "内部支票作废",
    T024407	=  "内部支票退回",
    T024408	=  "内部支票退回取消",
    T024501	=  "外部支票登记",
    T024502	=  "外部支票登记取消",
    T024503	=  "外部支票上缴",
    T024504	=  "外部支票上缴取消",
    T024505	=  "收到退回外部支票",
    T024506	=  "收到退回外部支票",
    T024507	=  "外部支票退回客户",
    T024508	=  "外部支票退回客户取消",
    T024509	=  "外部支票丢失",
    T024510	=  "外部支票丢失取消",
    T024511	=  "外部支票修改",
    T024512	=  "网点外部支票信息查询（单条记录）",
    T024513	=  "网点外部支票信息查询（多条）",
    T024515	=  "非支票方式余款退回",
    T024516	=  "非支票方式余款退回",
    T024517	=  "支票方式余款退回",
    T023102	=  "银行前置对账文件生成",
    T023103	=  "国际前置对账文件生成",
    T020327	=  "委托支付（行内支付）付款",
    T020323	=  "委托支付（行内支付）复核前查询",
    T026404	=  "大额退回应答报文发送",
    T026401	=  "大额自由格式报文发送",
    T026405	=  "大额撤销申请报文发送",
    T020406	=  "出纳冲正",
    T020401	=  "出纳银行收款",
    T020402	=  "出纳银行付款",
    T020403	=  "出纳银行日记账查询",
    T020404	=  "银行待销账查询",
    T020405	=  "会计交易银行查询",
    T020001	=  "待办事项查询",
    T020002	=  "内部账户信息查询",
    T020003	=  "科目与内部帐号对应关系查询",
    T020004	=  "上划下拨与央行/同业账户信息",
    T020005	=  "行名行号查询",
    T020006	=  "内部账户当日/历史交易明细查询",
    T020830	=  "委托支付大额支付落地复核前查询",
    T022801	=  "代储蓄2.0付款录入",
    T022807	=  "代储蓄2.0付款记账",
    T022811	=  "旧账号回显新账号",
    T020101	=  "审批限额维护新增(申请下拨资金人民币)",
    T020102	=  "审批限额维护修改(申请下拨资金人民币)",
    T020103	=  "审批限额维护停用(申请下拨资金人民币)",
    T021234	=  "小额普通贷记往账-小额普通贷记付款",
    T021244	=  "小额退回原账户录入",
    T020104	=  "审批限额维护列表(申请下拨资金人民币)",
    T020105	=  "审批限额维护授权(申请下拨资金人民币)",
    T020106	=  "审批参数维护新增",
    T021281	=  "委托支付小额支付落地查询",
    T020107	=  "审批参数维护修改",
    T020108	=  "审批参数维护停用",
    T021403	=  "撤销申请录入",
    T020109	=  "审批参数维护列表",
    T020110	=  "审批参数维护授权",
    T020111	=  "上划下拨人民币账户信息维护新增",
    T020112	=  "上划下拨人民币账户信息维护修改",
    T020113	=  "上划下拨人民币账户信息维护删除",
    T020114	=  "上划下拨人民币账户信息维护列表",
    T020115	=  "上划下拨人民币账户信息维护授权",
    T021601	=  "内部支票购入登记（购入取消）",
    T021602	=  "内部支票使用登记（使用修改）",
    T021603	=  "内部支票丢失/作废",
    T021604	=  "内部支票退回（退回取消）",
    T021605	=  "内部支票登记簿查询",
    T021607	=  "外部支票收到",
    T021608	=  "外部支票收妥/退回",
    T021609	=  "外部支票登记簿查询",
    T021611	=  "外部支票预处理",
    T021702	=  "会计出纳通用凭证重打(共？张凭证)",
    T021703	=  "支付交易通用凭证重打（共14张凭证）",
    T020612	=  "批量转账明细查询",
    T020613	=  "批量转账批次查询",
    T020901	=  "大额汇兑来账",
    T020902	=  "即时转账借贷通知",
    T020903	=  "接收大额清算回执",
    T020907	=  "收大额异常来账处理",
    T020908	=  "收大额往来账差错处理",
    T020909	=  "收大额支付系统状态变更通知",
    T021101	=  "大额信息类接收",
    T021301	=  "小额贷记来账",
    T021302	=  "小额通用确认通知",
    T021303	=  "小额借记回执来账",
    T021304	=  "小额清算回执",
    T021501	=  "小额借记来账",
    T021502	=  "小额申请类来账",
    T021503	=  "小额应答类来账",
    T021504	=  "小额信息类来账",
    T021505	=  "日切通知",
    T020117	=  "收款行清算路径信息维护",
    T020118	=  "收款行清算路径信息维护授权",
    T020119	=  "授权参数维护查询",
    T020120	=  "授权参数维护",
    T020121	=  "挂账账号维护新增",
    T020122	=  "挂账账号维护修改",
    T020123	=  "挂账账号维护删除",
    T020124	=  "挂账账号维护列表",
    T020125	=  "挂账账号维护授权",
    T020126	=  "收款人账户信息维护新增",
    T020515	=  "申请下拨资金现场审批（大额方式/银行方式）",
    T020127	=  "收款人账户信息维护修改",
    T020128	=  "收款人账户信息维护删除",
    T020129	=  "收款人账户信息维护列表",
    T020130	=  "收款人账户信息维护详细信息",
    T022007	=  "内部户批量委托支付(行内储蓄)",
    T022008	=  "内部户批量委托支付(行内内部)",
    T022020	=  "国际支付批量结算",
    T022013	=  "人行支付批量结算",
    T020131	=  "收款人账户信息维护授权",
    T020132	=  "授权参数维护授权",
    T020133	=  "外汇净额清算参数维护授权",
    T020136	=  "落地参数配置新增",
    T020137	=  "落地参数配置修改",
    T020138	=  "落地参数配置删除",
    T020139	=  "落地参数配置列表",
    T020140	=  "落地参数配置授权",
    T020146	=  "冲正交易配置新增",
    T020147	=  "冲正交易配置修改",
    T020148	=  "冲正交易配置删除",
    T020149	=  "冲正交易配置列表",
    T020150	=  "冲正交易配置授权",
    T022725	=  "向总行上划资金录入",
    T022726	=  "向总行上划资金复核",
    T022727	=  "向总行上划资金本地审批",
    T022728	=  "向总行上划资金异地审批",
    T022729	=  "向总行上划资金付款",
    T020151	=  "央行/同业账户信息新增",
    T020152	=  "央行/同业账户信息修改",
    T020252	=  "向央行或同业户提现",
    T020253	=  "向央行或同业户提现取消查询",
    T020254	=  "向央行或同业户提现取消",
    T020255	=  "向央行或同业户存现查询",
    T020256	=  "向央行或同业户存现",
    T020257	=  "向央行同业户或存现取消查询",
    T020258	=  "向央行同业户或存现取消",
    T020259	=  "银行拨款",
    T020260	=  "收到银行拨款",
    T020261	=  "收到拨款取消",
    T020262	=  "拨款入账取消",
    T020263	=  "收到拨款取消查询",
    T020264	=  "收到拨款查询",
    T020265	=  "拨款取消查询",
    T020266	=  "银行缴款入账",
    T020267	=  "收到缴款查询",
    T020268	=  "收到缴款入账",
    T020269	=  "缴款取消查询",
    T020270	=  "缴款入账取消",
    T020271	=  "收到缴款取消查询",
    T020272	=  "收到缴款入账取消",
    T020273	=  "拨款查询",
    T020274	=  "银行拨款支出",
    T020275	=  "收到拨款查询",
    T020276	=  "收到银行拨款",
    T020277	=  "收到拨款取消查询",
    T020278	=  "收到银行拨款取消",
    T020279	=  "拨款取消查询",
    T020280	=  "银行拨款支出取消",
    T020281	=  "缴款查询",
    T020282	=  "银行缴款支出",
    T020283	=  "收到缴款查询",
    T020284	=  "收到银行缴款",
    T020285	=  "缴款取消查询",
    T020286	=  "银行缴款支出取消",
    T020287	=  "缴款取消查询",
    T020288	=  "收到银行缴款取消",
    T020153	=  "央行/同业账户信息登记停用",
    T020154	=  "央行/同业账户信息列表",
    T020159	=  "业务系统对应内部账户维护列表",
    T020160	=  "审批限额维护授权(内部户转账)",
    T020161	=  "审批限额维护查询(内部户转账)",
    T020162	=  "审批限额维护新增(内部户转账)",
    T020163	=  "审批限额维护修改(内部户转账)",
    T020164	=  "审批限额维护删除(内部户转账)",
    T020116	=  "收款行清算路径信息维护查询",
    T020169	=  "审批限额维护查询(申请下拨外币)",
    T022799	=  "报文状态查询",
    T020701	=  "内部账户可用余额查询",
    T020702	=  "内部账户可用余额联机预约",
    T020703	=  "内部账户可用余额预约扣款",
    T020704	=  "内部账户人行支付往帐查询",
    T020705	=  "内部账户人行支付来账查询",
    T020170	=  "审批限额维护新增(申请下拨外币)",
    T020708	=  "内部账户联机付款（人行支付）",
    T020171	=  "审批限额维护修改(申请下拨外币)",
    T020720	=  "内部账户当日交易汇总查询",
    T020744	=  "内部户联机收款及预约",
    T020745	=  "可用余额增加",
    T020746	=  "可用余额减少",
    T020747	=  "同城支付方式",
    T020748	=  "文件通知接口",
    T020749	=  "联机批量文件处理状态查询",
    T020752	=  "内部户放款",
    T020753	=  "内部户联机付款（行内内部）",
    T020754	=  "受托支付（行外）",
    T020172	=  "审批限额维护删除(申请下拨外币)",
    T020760	=  "内部账户预销户",
    T020761	=  "内部账户销户",
    T020762	=  "内部账户预销户取消",
    T020765	=  "对账申请",
    T022001	=  "内部户可用余额批量增加",
    T022002	=  "内部户可用余额批量减少",
    T022004	=  "内部户批量委托支付(人行大额支付方式)",
    T022005	=  "内部户批量委托支付(人行小额支付方式)",
    T020173	=  "机构与行名行号对应关系维护新增",
    T020174	=  "机构与行名行号对应关系维护修改",
    T020175	=  "机构与行名行号对应关系维护删除",
    T020176	=  "机构与行名行号对应关系维护列表",
    T020177	=  "机构与行名行号对应关系维护授权",
    T020178	=  "央行/同业账户信息授权",
    T020179	=  "审批限额维护授权(申请下拨外币)",
    T020181	=  "付款人账户信息新增",
    T020870	=  "大额自动退汇",
    T020182	=  "付款人账户信息修改",
    T020183	=  "付款人账户信息删除",
    T020184	=  "付款人账户信息查询",
    T020191	=  "金融机构BIC信息维护",
    T020192	=  "外汇风险准备金/存款准备金参数维护",
    T020193	=  "国际跨行往来账户信息维护",
    T020194	=  "外汇净额清算参数维护",
    T020195	=  "付款人账户信息授权",
    T020196	=  "金融机构BIC信息授权",
    T020197	=  "外汇风险准备金/存款准备金参数维护授权",
    T020198	=  "国际跨行往来账户信息维护授权",
    T020201	=  "收银行利息",
    T020202	=  "收同城票交轧差款",
    T020203	=  "收央行再贴现票据资金",
    T020204	=  "内部户收款（银行方式）",
    T020205	=  "收境外结算资金",
    T020611	=  "内部户批量转账",
    T026601	=  "大额账务类发送服务",
    T026701	=  "小额账务类发送服务",
    T027006	=  "即时转借贷通知",
    T026501	=  "(大小额)自由格式发送",
    T026901	=  "贷记存款",
    T020206	=  "收国际结算汇费收入",
    T020209	=  "收央行/同业其它款项入账",
    T020210	=  "外部支票入账",
    T026902	=  "公司文件通知",
    T026903	=  "代储蓄2.0来账通知、付款通知",
    T020211	=  "支付银行结算手续费",
    T027002	=  "JSON文件通知",
    T020212	=  "付同城票交轧差款",
    T020213	=  "付央行再贴现票据资金",
    T027005	=  "人行支付文件通知",
    T026801	=  "国际支付往账发送",
    T020007	=  "委托支付指令查询",
    T020008	=  "内部账户可用余额预约登记簿查询",
    T020009	=  "调拨与央行/同业账户",
    T020010	=  "异地审批交易查询",
    T020214	=  "付境外结算资金",
    T020215	=  "支付银行结算手续费授权",
    T020216	=  "付同城票交轧差款授权",
    T023001	=  "日切",
    T020330	=  "内部户付款录入(虚拟)",
    T020331	=  "内部户付款复核(虚拟)",
    T020332	=  "内部户付款支付(虚拟)",
    T020334	=  "委托付款复核(虚拟)",
    T020335	=  "委托付款支付(虚拟)",
    T020530	=  "总行/同业资金调出",
    T021270	=  "小额自动退汇",
    T020217	=  "补计提/冲多计提利息税手续费",
    T020218	=  "付央行再贴现票据资金授权",
    T020219	=  "付境外结算资金授权",
    T020220	=  "补计提/冲多计提利息税手续费授权",
    T020222	=  "内部户付款（行内汇划）",
    T020238	=  "内部户付款（行内汇划）付款",
    T020250	=  "手工会计冲正交易授权",
    T020251	=  "手工会计冲正交易",
    T020307	=  "内部户付款（行内汇划）复核",
    T020313	=  "内部户付款（行内汇划）审批(本地)",
    T026403	=  "大额退回申请报文发送",
    T020322	=  "委托支付（行内支付）复核",
    T020324	=  "行内汇划登记簿查询",
    T020325	=  "委托支付（行内支付）本地审批+付款",
    T020326	=  "委托支付（行内支付）异地审批",
    T020155	=  "央行/同业账户信息维护明细查询",
    T020156	=  "业务系统对应内部账户维护新增",
    T020157	=  "业务系统对应内部账户维护修改",
    T020158	=  "业务系统对应内部账户维护删除",
    T020336	=  "内部户付款（银行方式）",
    T026402	=  "大额查询查复报文发送",
    T020337	=  "内部户付款（银行方式）复核",
    T020338	=  "内部户付款（银行方式）付款",
    T020339	=  "内部户付款（银行方式）异地审批",
    T020340	=  "内部户付款（行内储蓄）录入",
    T020341	=  "内部户付款（行内储蓄）复核",
    T020342	=  "内部户付款（行内储蓄）异地审批",
    T020531	=  "申请下拨资金",
    T020532	=  "向上级划款",
    T020343	=  "内部户付款（行内储蓄）付款",
    T020345	=  "内部户收款(行内储蓄)",
    T020346	=  "内部户收款(行内公司)",
    T020347	=  "内部户收款（行内公司）复核",
    T020348	=  "内部户收款（行内公司）收款",
    T020349	=  "内部户收款（行内储蓄）复核",
    T023101	=  "公司对账文件生成",
    T020350	=  "内部户收款（行内储蓄）（审批+记账）",
    T020351	=  "内部户收款（行内储蓄）异地审批",
    T020352	=  "内部户收款（行内公司）异地审批",
    T024701	=  "手工事项交易",
    T024702	=  "手工事项-冲正交易",
    T024703	=  "手工事项登记簿查询",
    T024704	=  "收银行利息",
    T024705	=  "补计提/冲多计提银行利息",
    T024706	=  "付银行结算手续费",
    T024707	=  "开户或续存客户支票存款入账",
    T024708	=  "商务汇款客户支票存款入账",
    T024709	=  "基金客户支票存款入账",
    T024710	=  "保险客户支票存款入账",
    T024711	=  "理财客户支票存款入账",
    T024712	=  "收到代付业务款",
    T024713	=  "存放同业收款",
    T024714	=  "付代收业务款",
    T024715	=  "付代付业务款",
    T024716	=  "存放同业付款",
    T024518	=  "开户或续存客户支票余款退回",
    T024519	=  "商务汇款客户支票余款退回",
    T024520	=  "基金客户支票余款退回",
    T024521	=  "保险客户支票余款退回",
    T024522	=  "理财客户支票余款退回",
    T024524	=  "网点凭证补打",
    T024523	=  "网点凭证补打查询",
    T021615	=  "网点外部支票入账出纳冲正",
    T021614	=  "收到的上缴外部支票的丢失操作",
    T021613	=  "收妥、修改、退回、退回取消",
    T021612	=  "收到外部支票登记",
    T021616	=  "网点外部支票入账会计冲正",
    T024411	=  "网点内部支票明细查询",
    T024410	=  "网点内部支票结余查询",
    T024409	=  "网点内部支票信息查询（单记录）",
    T024514	=  "入账通知信息查询",
    T021307	=  "小额支票影像CIS100回执",
    T020777	=  "大额提现参数查询",
    T020353	=  "内部户付款（同城方式）",
    T022738	=  "向总行申请下拨资金异地审批(中行网银）",
    T020841	=  "大额往帐应急控制授权查询",
    T022737	=  "向总行申请下拨资金审批(中行网银）",
    T022736	=  "向总行申请下拨资金复核(中行网银）",
    T022735	=  "向总行申请下拨资金录入(中行网银）",
    T020617	=  "批量内部户转账复核",
    T020618	=  "批量内部户转账授权",
    T020619	=  "批量内部户转账异地审批",
    T024601	=  "大额提现",
    T020354	=  "内部户付款（同城方式）复核",
    T020355	=  "内部户付款(同城方式)付款",
    T020356	=  "委托支付（同城方式）复核",
    T020357	=  "委托支付（同城方式）付款",
    T020358	=  "同城支付交易登记簿查询",
    T020359	=  "内部户付款（同城方式）异地审批",
    T020360	=  "委托支付（同城方式）异地审批",
    T020408	=  "会计交易登记簿查询",
    T020409	=  "资金调拨登记簿查询",
    T020501	=  "央行/同业资金调出（录入）",
    T020502	=  "央行/同业资金调入",
    T020503	=  "申请下拨资金录入（大额/银行方式）",
    T020504	=  "收到上划资金",
    T020505	=  "向上级划款（银行方式）",
    T020506	=  "收到下拨资金",
    T020509	=  "央行/同业资金调出（复核）",
    T020510	=  "申请下拨资金复核（银行方式）",
    T020511	=  "向上级划款（银行方式）复核",
    T020514	=  "央行同业资金调出（本地审批+付款）",
    T020516	=  "向上级划款（本地审批+付款）",
    T020519	=  "央行/同业资金调出（远程审批）",
    T020520	=  "申请下拨资金（远程审批）",
    T020521	=  "向上级划款（远程审批）",
    T020527	=  "向下级拔款",
    T020602	=  "内部户转账录入",
    T020603	=  "内部户转账复核",
    T020604	=  "内部户转账审批（异地）",
    T020605	=  "内部户转账审批(本地)",
    T020606	=  "内部户转账付款",
    T020610	=  "批量转账文件接收",
    T020614	=  "批量转账执行",
    T020706	=  "内部账户联机开户信息登记",
    T020712	=  "批量委托支付查询",
    T020716	=  "内部账户联机付款（行内支付）",
    T020717	=  "委托收款:行内公司扣款",
    T020755	=  "受托支付（行内公司）",
    T020764	=  "修改内部账户信息",
    T020770	=  "委托收款（同城方式）",
    T020771	=  "委托收款（同城退票入账）",
    T020772	=  "委托支付(同城支付)",
    T020775	=  "内部账户与业务系统绑定交易",
    T020801	=  "大额支付汇兑",
    T020802	=  "大额退汇录入",
    T020803	=  "手工入账录入",
    T020804	=  "大额支付汇兑复核",
    T020805	=  "大额委托支付复核",
    T020806	=  "大额支付汇兑审批（本地）",
    T020807	=  "大额支付汇兑审批（异地)",
    T020810	=  "大额退汇授权",
    T020811	=  "大额支付汇兑付款",
    T020826	=  "手工入账授权",
    T020836	=  "大额委托支付审批（本地）",
    T020837	=  "大额委托支付审批（异地）",
    T020838	=  "大额委托支付付款",
    T020839	=  "大额即时转借贷手工入账录入",
    T020840	=  "大额批量退汇",
    T020843	=  "大额即时转借贷手工入账授权",
    T020844	=  "大额批量退汇授权",
    T021001	=  "大额撤销申请录入",
    T021002	=  "大额撤销申请授权",
    T021005	=  "发大额查询书",
    T021009	=  "发大额查复书",
    T021013	=  "发大额自由格式",
    T021017	=  "大额退回申请录入",
    T021018	=  "大额退回申请授权",
    T021021	=  "大额退回申请应答录入",
    T021022	=  "大额退回申请应答授权",
    T021025	=  "大额往账查询",
    T021026	=  "大额来帐查询",
    T021027	=  "查询查复查询",
    T021028	=  "退回申请查询",
    T021029	=  "撤销处理查询",
    T021030	=  "自由格式查询",
    T021201	=  "小额普通贷记录入",
    T021204	=  "小额退汇录入",
    T021205	=  "小额批量退汇录入",
    T021206	=  "小额普通借记录入",
    T021207	=  "小额普通借记回执录入",
    T021208	=  "小额退汇授权",
    T021209	=  "小额手工入账授权",
    T021210	=  "小额手工入账录入",
    T021211	=  "小额普通借记授权",
    T021212	=  "小额普通借记回执授权",
    T021213	=  "小额批量退汇授权",
    T021228	=  "小额普通贷记复核",
    T021231	=  "小额普通贷记审批（付款）",
    T021245	=  "小额普通贷记审批（异地）",
    T021246	=  "委托指令审批（异地）",
    T021247	=  "委托指令审批（本地）（付款）",
    T021280	=  "委托指令复核",
    T021401	=  "小额借记止付申请录入",
    T021402	=  "小额借记止付应答录入",
    T021404	=  "小额退回申请录入",
    T021405	=  "小额退回申请应答录入",
    T021406	=  "发小额查询书",
    T021407	=  "发小额查复书",
    T021408	=  "发小额自由格式",
    T021409	=  "小额借记止付申请授权",
    T021410	=  "小额借记止付应答授权",
    T021411	=  "小额退回申请授权",
    T021412	=  "小额退回申请应答授权",
    T021431	=  "小额往帐登记查询",
    T021432	=  "小额来帐登记查询",
    T021433	=  "小额借记止付申请登记查询",
    T021434	=  "小额借记回执登记查询",
    T021438	=  "手工入账登记查询",
    T021701	=  "审批登记簿查询",
    T021707	=  "与公司对账不一致结果查询",
    T021723	=  "国际结算文件查询",
    T021724	=  "外汇支付往账登记簿查询",
    T021725	=  "外币往账交易统计查询",
    T021901	=  "境内外汇资金调出录入",
    T021902	=  "境内外汇资金调出复核",
    T021903	=  "境内外汇资金调出付款(含本地审批）",
    T021904	=  "境内外汇资金调出异地审批",
    T021905	=  "境内外汇普通贷记业务录入",
    T021906	=  "境内外汇普通贷记业务复核",
    T021907	=  "境内外汇普通贷记业务付款(含本地审批）",
    T021908	=  "境内外汇普通贷记业务异地审批",
    T021909	=  "境内外汇资金调拨业务退汇录入",
    T021910	=  "境内外汇资金调拨业务退汇授权(预留）",
    T021911	=  "境内外汇普通贷记业务退汇录入",
    T021912	=  "境内外汇普通贷记业务退汇授权(预留)",
    T022061	=  "批量委托支付发人行（小额方式）",
    T022755	=  "账户附加信息维护增删改",
}

local function detect_resp(s_payload)
    if s_payload == nil then return nil end
    return ApmJson.decode(s_payload)
end

local function parse_resp(t_json_tree)
    -- 交易返回码, 交易返回信息
    return t_json_tree.errorCode, t_json_tree.errorMsg
end

function post_analysis()
    local ApmData = require("ApmData")
    if ApmData.getL7Proto() ~= 80 then return end
    if ApmData.getMsgType() ~= 1 then return end

    local s_resp
    local s_transtype
    local s_transtype_name
    local s_channel
    local s_channel_name
    local s_flowno
    local s_rspcode
    local s_rspmsg

    local t_kv = ApmHttpUtil.getParams(ApmData)
    if t_kv ~= nil then
        s_transtype = t_kv["tcode"]
        if s_transtype ~= nil and s_transtype ~= '' then
            s_transtype = string.trim(s_transtype)
            s_transtype_name = dict_transtype[s_transtype]
            if s_transtype_name == nil then s_transtype_name = s_transtype end
        end
    end

    s_resp = ApmData.getField("response.http.body.1", 1)
    if s_resp ~= nil then
        s_resp = string.trim(s_resp)
        local t_json_tree = detect_resp(s_resp)
        if t_json_tree ~= nil then
            s_rspcode, s_rspmsg = parse_resp(t_json_tree)
        end
    end

    if s_transtype == nil then
        logInfo("RESP:[%s]", s_resp)
    else
        ApmData.replaceField("transaction.type_code", s_transtype)
        ApmData.replaceField("transaction.type_name", s_transtype_name)

        if s_channel ~= nil then
            ApmData.replaceField("transaction.channel_code", s_channel)
            ApmData.replaceField("transaction.channel_name", s_channel_name)
        end

        if s_flowno ~= nil then
            ApmData.replaceField("transaction.code", s_flowno)
        end

        if s_rspcode ~= nil then
            ApmData.replaceField("response.code_string", s_rspcode)
            ApmData.delFields("response.code")
        end

        if s_rspmsg ~= nil then
            ApmData.replaceField("response.error_message", s_rspmsg)
        end

        logInfo("WEB应用(%s:%d->%s:%d) name:%s|channel:%s|seq:%s|ret:%s|%s",
            ApmData.getSrcIp(),
            ApmData.getSrcPort(),
            ApmData.getDstIp(),
            ApmData.getDstPort(),
            s_transtype_name,
            s_channel_name,
            s_flowno,
            s_rspcode,
            s_rspmsg
        )
    end

    return
end
--WEB应用
--20.13.2.45:8995
--20.13.2.47:8995
--v1.0.0
